//
//  DBManager.h
//  OutesIOS
//
//  Created by norman on 2018/11/4.
//  Copyright © 2018 norman. All rights reserved.
//

#import <Foundation/Foundation.h>
#import <FMDB.h>

NS_ASSUME_NONNULL_BEGIN

@interface DBManager : NSObject

+ (DBManager *)manager;

- (BOOL)open:(NSString*)database;

- (BOOL)addColumn:(NSString *)columnName withType:(NSString*)type inTable:(NSString*)tableName;

- (BOOL)update:sql withParameterDictionary:(NSDictionary *)arguments;

- (FMResultSet*)query:(NSString *)sql;

- (BOOL)update:(NSString *)sql;

- (NSArray*)queryArrayData:(NSString *)sql;

- (NSDictionary*)queryOneRowData:(NSString *)sql;

- (NSString*)queryStringData:(NSString *)sql;

- (double)queryDoubleData:(NSString *)sql;

- (void)close;

@end

NS_ASSUME_NONNULL_END
